#ifndef PARTICIPANT_H
#define PARTICIPANT_H

#include <QObject>
#include <QString>
#include <QByteArray>
#include <QTime>

namespace Data {
class Participant;
};

class Participant : public QObject
{
    Q_OBJECT
public:
    enum StatusType {
        ParticipantPresent,
        ParticipantAbsent,
        ParticipantUnknown
    };

    enum TagType {
        Paricipant,
        Organiser
    };

    Participant(QObject *parent = 0);
    Participant(QObject *parent = 0, QByteArray uid = 0, QDateTime time = QDateTime::currentDateTime());
//    explicit Participant(QObject *parent = 0, QByteArray uid = 0, TagType participantType = Participant, QString participantName = "", StatusType paticipantStatus = ParticipantUnknown, QTime time = QTime(0,0,0));
    Participant(QObject *parent, QByteArray uid, Participant::TagType participantType, QString participantName, Participant::StatusType participantStatus, QDateTime time);
    Participant(QString uid, QString participantType, QString participantName, QString participantStatus);
//    ~Participant();

    QByteArray getTagId();
    TagType getTagType();
    QString getName();
    StatusType getStatus();
    bool getCheckedIn();
    QDateTime getScanTime();

signals:
    void dataUpdated();

public slots:
    void setData(Participant::TagType participantType, QString participantName, Participant::StatusType paticipantStatus);
    void setData(QString participantType, QString participantName, QString paticipantStatus);
    void checkIn();

private:
    QByteArray tagId;
    TagType tagType;
    QString name;
    StatusType status;
    bool checkedIn;
    QDateTime scanTime;
};

#endif // PARTICIPANT_H
